<!DOCTYPE html>
<html>
<head>@@include('../common/header.html',{"title":"代码生成"})
<script id="table-column-tr-template" type="text/x-jquery-tmpl">
<tr>
<td>
<input type="hidden" name="columnInfos[][dbColumnName]" value="${dbColumnName}"/>
<input type="hidden" name="columnInfos[][columnType]" value="${columnType}"/>
<input type="hidden" name="columnInfos[][columnKey]" value="${columnKey}"/>
<input type="hidden" name="columnInfos[][extra]" value="${extra}"/>
<input type="hidden" name="columnInfos[][dataType]" value="${dataType}"/>
<input type="hidden" name="columnInfos[][jdbcType]" value="${jdbcType}"/>
<input type="hidden" name="columnInfos[][maxLength]" value="${maxLength}"/>
${dbColumnName}
</td>
<td><input type="text"  class="form-control"  name="columnInfos[][columnComment]" value="${columnComment}" maxlength="10" style="width:100px;"/></td>
<td>${columnType}</td>
<td>
	<select class="form-control" name="columnInfos[][javaType]">
		<option value="String" {{if javaType == 'String'}}selected="selected"{{/if}} >String</option>
		<option value="Short" {{if javaType == 'Short'}}selected="selected"{{/if}}>Short</option>
		<option value="Integer" {{if javaType == 'Integer'}}selected="selected"{{/if}}>Integer</option>
		<option value="Double" {{if javaType == 'Double'}}selected="selected"{{/if}}>Double</option>
		<option value="Float" {{if javaType == 'Float'}}selected="selected"{{/if}}>Float</option>
		<option value="Date" {{if javaType == 'Date'}}selected="selected"{{/if}}>Date</option>
		<option value="BigDecimal" {{if javaType == 'BigDecimal'}}selected="selected"{{/if}}>BigDecimal</option>
		<option value="Long" {{if javaType == 'Long'}}selected="selected"{{/if}}>Long</option>
    </select>
</td>
<td><input type="text"  class="form-control" name="columnInfos[][javaFieldName]" value="${javaFieldName}" maxlength="20" required style="width:100px;"/></td>
<td><input type="checkbox" name="columnInfos[][nullable]" value="1" {{if typeof(nullable)!='undefined' && nullable == '1'}}checked{{/if}} /></td>
<td><input type="checkbox" name="columnInfos[][insert]" value="1" {{if typeof(insert)!='undefined' && insert == '1'}}checked{{/if}} /></td>
<td><input type="checkbox" name="columnInfos[][update]" value="1" {{if typeof(update)!='undefined' && update == '1'}}checked{{/if}} /></td>
<td>
	<input type="checkbox" name="columnInfos[][list]" value="1" {{if typeof(list)!='undefined' && list == '1'}}checked{{/if}} />&nbsp;|
	<input type="checkbox" name="columnInfos[][sortable]" value="1" {{if typeof(sortable)!='undefined' && sortable == '1'}}checked{{/if}} />
</td>
<td><input type="checkbox" name="columnInfos[][search]" value="1" {{if typeof(search)!='undefined' && search == '1'}}checked{{/if}} /></td>
<td>
	<select class="form-control" name="columnInfos[][queryType]">
		<option value="">请选择</option>
		<option value="=" {{if typeof(queryType)!='undefined' && queryType == '='}}selected="selected"{{/if}}>=</option>
		<option value="!=" {{if typeof(queryType)!='undefined' && queryType == "!="}}selected="selected"{{/if}}>!=</option>
		<option value=">=" {{if typeof(queryType)!='undefined' && queryType == '>='}}selected="selected"{{/if}}>>=</option>
		<option value=">" {{if typeof(queryType)!='undefined' && queryType == '>'}}selected="selected"{{/if}}>></option>
		<option value="<=" {{if typeof(queryType)!='undefined' && queryType == '<='}}selected="selected"{{/if}}><=</option>
		<option value="<" {{if typeof(queryType)!='undefined' &&  queryType == '<'}}selected="selected"{{/if}}><</option>
		<option value="between" {{if typeof(queryType)!='undefined' && queryType == 'between'}}selected="selected"{{/if}}>between</option>
		<option value="like" {{if typeof(queryType)!='undefined' && queryType == 'like'}}selected="selected"{{/if}}>like</option>
		<option value="left like" {{if typeof(queryType)!='undefined' && queryType == 'left like'}}selected="selected"{{/if}}>left like</option>
		<option value="right like" {{if typeof(queryType)!='undefined' && queryType == 'right like'}}selected="selected"{{/if}}>right like</option>
    </select>
</td>
<td>
	<select class="form-control" name="columnInfos[][inputType]">
		<option value="text" {{if typeof(inputType)!='undefined' && inputType == 'text'}}selected="selected"{{/if}}>文本框</option>
	    <option value="select" {{if typeof(inputType)!='undefined' && inputType == 'select'}}selected="selected"{{/if}}>下拉框</option>
		<option value="hidden" {{if typeof(inputType)!='undefined' && inputType == 'hidden'}}selected="selected"{{/if}}>隐藏框</option>
		<option value="zhengshu" {{if typeof(inputType)!='undefined' && inputType == 'zhengshu'}}selected="selected"{{/if}}>整数框</option>
		<option value="xiaoshu" {{if typeof(inputType)!='undefined' && inputType == 'xiaoshu'}}selected="selected"{{/if}}>小数框</option>
		<option value="checkbox" {{if typeof(inputType)!='undefined' && inputType == 'checkbox'}}selected="selected"{{/if}}>复选框</option>
		<option value="radio" {{if typeof(inputType)!='undefined' && inputType == 'radio'}}selected="selected"{{/if}}>单选框</option>
		<option value="date" {{if typeof(inputType)!='undefined' && inputType == 'date'}}selected="selected"{{/if}}>日期选择</option>
		<option value="textarea" {{if typeof(inputType)!='undefined' && inputType == 'textarea'}}selected="selected"{{/if}}>文本域</option>
		<option value="richtext" {{if typeof(inputType)!='undefined' && inputType == 'richtext'}}selected="selected"{{/if}}>富文本</option>
		<option value="picture" {{if typeof(inputType)!='undefined' && inputType == 'picture'}}selected="selected"{{/if}}>图片上传</option>
		<option value="file" {{if typeof(inputType)!='undefined' && inputType == 'file'}}selected="selected"{{/if}}>文件上传</option>

    </select>
</td>
<td><input type="text" class="form-control"  name="columnInfos[][dictType]" value="${dictType}" maxlength="20" style="width:80px;" /></td>
<td><input type="number"  class="form-control"  name="columnInfos[][sort]" value="${sort}" maxlength="3" required style="width:70px;"/></td>
</tr>
</script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">
		<div class="content-wrapper ml0">
			<section class="content-header">
				<h1>代码生成</h1>
				<ol class="breadcrumb">
					<li><a href="#"><i class="fa fa-dashboard"></i>系统管理</a></li>
					<li class="active">代码生成</li>
				</ol>
			</section>
			<section class="content container-fluid">
				<div class="box box-primary">
					<div class="box-body">
						<form class="form-inline" way-scope="model.search">
							<div class="form-group">
								<input type="text" class="form-control" placeholder="菜单名称"
									name="menuName" way-data="menuName" maxlength="50">
							</div>
							<div class="form-group">
								<input type="text" class="form-control" placeholder="模块"
									name="moduleName" way-data="moduleName" maxlength="50">
							</div>
							<button type="button" class="btn btn-default sf-permission-ctl"
								id="search" data-sf-permission="sys:gen:qry">
								<i class="fa fa-search"></i>
							</button>
							<div class="btn-group pull-right">
								<button type="button" class="btn btn-primary sf-permission-ctl"
									id="add" data-sf-permission="sys:gen:save">
									<i class="fa fa-plus"></i>
								</button>
								<button type="button" class="btn btn-info sf-permission-ctl"
									id="edit" data-sf-permission="sys:gen:update">
									<i class="fa fa-edit"></i>
								</button>
								<button type="button" class="btn btn-danger sf-permission-ctl"
									id="delete" data-sf-permission="sys:gen:delete">
									<i class="fa fa-trash-o"></i>
								</button>
							</div>
						</form>
					</div>
				</div>
				<div class="box">
					<div class="box-body">
						<!-- table -->
						<table id="table"></table>
					</div>
				</div>
			</section>
		</div>
	</div>
	<div id="form-panel" class="row mg5 undisplay">
		<form class="form-horizontal" way-scope="model.form.data" id="data-form">
			<input type="hidden" way-data="id" name="id">
			<input type="hidden" way-data="pkType" name="pkType">
			<div class="form-group">
				<div class="group">
					<label class="col-sm-2 control-label">表名<font
						class="text-red">*</font></label>
					<div class="col-sm-3">
						<select class="form-control selectpicker"  data-live-search="true" name="tableName" way-data="tableName" id="table-select" required="required" data-bv-group=".group">
							<option value="">请选择表</option>
						</select>
					</div>
				</div>
				<div class="group">
					<label class="col-sm-2 control-label">菜单名<font
						class="text-red">*</font></label>
					<div class="col-sm-3">
						<input type="text" class="form-control" way-data="menuName"
							maxlength="50" name="menuName" required placeholder="如：用户管理" data-bv-group=".group">
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="group">	
					<label class="col-sm-2 control-label">模块名<font
						class="text-red">*</font></label>
					<div class="col-sm-3">
						<input type="text" class="form-control" way-data="moduleName"
							maxlength="10"  name="moduleName" required placeholder="如:sys" data-bv-group=".group">
					</div>
				</div>
				<div class="group">
					<label class="col-sm-2 control-label">功能模块<font
						class="text-red">*</font></label>
					<div class="col-sm-3">
						<input type="text" class="form-control" way-data="functionName"
							maxlength="20" name="functionName" required placeholder="如：param" data-bv-group=".group">
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="group">
					<label class="col-sm-2 control-label">类名<font
						class="text-red">*</font></label>
					<div class="col-sm-3">
						<input type="text" class="form-control" way-data="className"
							maxlength="50"  name="className" required placeholder="如:SysUser" data-bv-group=".group">
					</div>
				</div>
				<div class="group">
					<label class="col-sm-2 control-label">模板<font
						class="text-red">*</font></label>
					<div class="col-sm-3">
						<select class="form-control" name="template" way-data="template" required data-bv-group=".group">
							<option value="">请选择</option>
							<option value="1">基本增删改查</option>
							<option value="2" disabled="disabled">树结构</option>
						</select>
					</div>
				</div>
			</div>
			<div class="table-responsive">
				<table class="table table-bordered table-hover">
					<thead>
						<tr>
							<th>列名</th>
							<th>备注</th>
							<th>类型</th>
							<th>java类型</th>
							<th>字段名称</th>
							<th>可空</th>
							<th>插入</th>
							<th>更新</th>
							<th>列表|排序</th>
							<th>查询</th>
							<th>查询方式</th>
							<th>表单类型</th>
							<th>字典</th>
							<th>排序</th>
						</tr>
					</thead>
					<tbody id="table-body">
					</tbody>
				</table>
			</div>

			<div class="row">
				<button type="button" class="btn btn-default col-md-offset-1" id="form-panel-close">
					<i class="fa fa-times"></i> 取消
				</button>
				<button type="submit" class="btn btn-primary col-md-offset-8">
					<i class="fa fa-save"></i> 保存
				</button>
			</div>
		</form>
	</div>
	@@include('../common/common-js.html')
	<script src="/admin/js/sys/gen.js"></script>
</body>
</html>